package com.jinbm.common.exception;

import com.jinbm.common.request.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * Author:JinBoming
 * Date:2023/9/6
 * Time:09:25
 **/
@RestControllerAdvice
public class GlobeException {

    // 全局异常拦截
    @ExceptionHandler
    public R handlerException(Exception e) {
        e.printStackTrace();
        return R.error(e.getMessage());
    }


}
